From: James Antill Date: Fri, 25 Jul 2014 14:08:02 +0000 (-0400) Subject: pull: override max-conns-per-host to 8, for faster downloads X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~1136 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=249da7aef20d9a4ec0b2cb04ad2a9184974f7e4d;p=ostree.git pull: override max-conns-per-host to 8, for faster downloads Modern web browsers are all converging on 6 or 8. Let's match that. --- diff --git a/src/libostree/ostree-fetcher.c b/src/libostree/ostree-fetcher.c index b6dc761f..a049e0f4 100644 --- a/src/libostree/ostree-fetcher.c +++ b/src/libostree/ostree-fetcher.c @@ -188,6 +188,14 @@ _ostree_fetcher_init (OstreeFetcher *self) self->requester = (SoupRequester *)soup_session_get_feature (self->session, SOUP_TYPE_REQUESTER); g_object_get (self->session, "max-conns-per-host", &max_conns, NULL); + if (max_conns <= 8) + { + // We download a lot of small objects in ostree, so this helps a + // lot. Also matches what most modern browsers do. + max_conns = 8; + g_object_set (self->session, "max-conns-per-host", max_conns, NULL); + } + self->max_outstanding = 3 * max_conns; g_signal_connect (self->session, "request-started",